package com.heima.media.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.media.service.IWmMaterialService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;


@RestController
@RequestMapping("/api/v1/material")
@Api(tags = "自媒体图文素材信息表接口")
@CrossOrigin
public class WmMaterialController{

    @Autowired
    private IWmMaterialService wmMaterialService;

    /**
     * 图片上传
     * @param file
     * @return
     */
    @PostMapping("/upload_picture")
    public ResponseResult upload(MultipartFile file) {
        return wmMaterialService.upload(file);
    }

}

